<%@ page language="java" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"
    import="com.optimus.utils.SpringUtils"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.List, com.optimus.db.DataBaseManager"%><html>
<head>
<script src="http://code.jquery.com/jquery-latest.js">
</script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js">
</script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js">
</script>
<%	List<String> words = SpringUtils.getDatabaseManager().getAutoCompleteTable("autocomplete");
	StringBuffer auto = new StringBuffer();
	for (String word : words)
	{
		auto.append(word);
		auto.append(" ");
	}
%>
<script>
$(document).ready(
function()
{
	var mySearchs="<%=auto.toString()%>".split(" ");

	$("#products").autocomplete(mySearchs);
} );
</script>
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css"
type="text/css" />
<style>

#SearchPanelComponent
{
background-image:url("images/SearchBg.png");
color: white;
font-style: normal;
width: 1280px;
top: 0px;
}
</style>
</head>
<body>
	<div id="SearchPanelComponent">
		<form action="categoryPage.jsp" method="get">
		<table >
			<tbody>
				<tr>
					<td><img  alt="" src="images/autobots.png" width="50" height="50"></td>
					<td></td>
					<td>
					<div id="Categories">
					  <SELECT NAME="cid" style="width: 120px; height:20px;">
	                  <OPTION VALUE="00" SELECTED>All Categories</OPTION>
	                  <OPTION VALUE="01">Electronics</OPTION>
	                  <OPTION VALUE="02">Computers</OPTION>
	                  <OPTION VALUE="03">Cameras</OPTION>
	                  <OPTION VALUE="04">Sports</OPTION>
	                  <OPTION VALUE="05">Toys</OPTION>
	                  <OPTION VALUE="06">Music</OPTION>
	             	 </SELECT>
	             	 </div>
					</td>
					<td width="2"></td>
					<td>
						<div style="color: silver;"><b>Search Here:</b><input id="products" name="search" value="" style="width: 400px;"/>
						</div>
					</td>
					<td width="5"></td>
					<td><input type="image" src="images/searchbutton.png" width="55"/></td>
				</tr>
			</tbody>
		</table>
		</form>
	</div>
</body>
</html>